#!/bin/bash

# Change the module name to avoid name conflicts

# These lines assume that the script is called from the main src
# folder, and append the relative path to the module name.
qualifier=`dirname $1`
src_dir=`pwd`
qualifier=`echo ${qualifier} | sed "s,^${src_dir},,"`
# strip characters which may confuse doxygen
qualifier=`echo ${qualifier} | sed 's,\.,,g'`
qualifier=`echo ${qualifier} | sed 's,^/,,'`
qualifier=`echo ${qualifier} | sed 's,/,_,g'`
qualifier=`echo ${qualifier} | sed 's,\-,,g'`
sed "s/^\(module\|end *module\) \([A-z0-9]*\)$/\1 ${qualifier}_\2/" $1

